package com.coda.clouddisk.entity;

import cn.hutool.core.collection.CollUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * <p>Description: 统一树结构</p>
 */
@Data
@ApiModel(description = "统一树结构")
public class BaseTree<T> {

    @ApiModelProperty("主键")
    private String id;

    @ApiModelProperty("父节点id")
    private String parentId;

    @ApiModelProperty("层级")
    private Integer tier;

    @ApiModelProperty("子节点")

    private List<T> children = CollUtil.newArrayList();
}
